<!--{include manage_header}-->

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="leader">
	<div class="dashboard" id="dashboard">
		<ul>${mcurrent_team(null)}</ul>
	</div>
	<div id="content" class="clear mainwide">
        <div class="clear box">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head"><h2>Editar</h2><span class="headtip">（{$team['title']}）</span></div>
                <div class="sect">
				<form id="login-user-form" method="post" action="/manage/team/create.php" enctype="multipart/form-data" class="validator">
					<div class="wholetip clear"><h3>1. Basico</h3></div>
					<div class="field">
						<label>Cidade e Categoria</label>
						<select name="city_id" class="f-input" style="width:200px;">${Utility::Option($cities, $team['city_id'])}</select><select name="group_id" class="f-input" style="width:200px;">${Utility::Option($groups, $team['group_id'])}</select>
					</div>
					<div class="field">
						<label>Titulo da Oferta</label>
						<input type="text" size="30" name="title" id="team-create-title" class="f-input" value="{$team['title']}" require="true" datatype="require"/>
					</div>
					<div class="field">
						<label>Valor</label>
						<input type="text" size="10" name="market_price" id="team-create-market-price" class="number" value="${moneyit($team['market_price'])}" datatype="money" require="true" />
						<label>Preço da Oferta</label>
						<input type="text" size="10" name="team_price" id="team-create-team-price" class="number" value="${moneyit($team['team_price'])}" datatype="money" require="true" />
						<span class="inputtip">Preço das ofertas devem ser inferior ao Valor acima</span>
					</div>
					<div class="field">
						<label>Mínimo</label>
						<input type="text" size="10" name="min_number" id="team-create-min-number" class="number" value="${intval($team['min_number'])}" maxLength="6" datatype="number" require="true" />
						<label>Máximo</label>
						<input type="text" size="10" name="max_number" id="team-create-max-number" class="number" value="${intval($team['max_number'])}" maxLength="6" datatype="number" require="true" />
						<label>Máximo de Pessoa</label>
						<input type="text" size="10" name="per_number" id="team-create-per-number" class="number" value="${intval($team['per_number'])}" maxLength="6" datatype="number" require="true" />
						<span class="hint">Mínimo deve ser maior que 0, máximo setado como 0 significa sem limite.</span>
					</div>
					<div class="field">
						<label>Data de inicio</label>
						<input type="text" size="10" name="begin_time" id="team-create-begin-time" class="date" value="${date('Y-m-d', $team['begin_time'])}" maxLength="10" readonly />
						<label>Data de término</label>
						<input type="text" size="10" name="end_time" id="team-create-end-time" class="date" value="${date('Y-m-d', $team['end_time'])}" maxLength="10" />
						<label>Valido até</label>
						<input type="text" size="10" name="expire_time" id="team-create-expire-time" class="date" value="${date('Y-m-d', $team['expire_time'])}" maxLength="10" />
						<span class="hint">Inicia na data de início às 00:00:00, termina na data de término às 00:00:00</span>
					</div>
					<div class="field">
						<label>Breve Introdução</label>
						<div style="float:left;"><textarea cols="45" rows="5" name="summary" id="team-create-summary" class="f-textarea editor"></textarea></div>
					</div>
					<div class="field">
						<label>Regulamento</label>
						<div style="float:left;"><textarea cols="45" rows="5" name="notice" id="team-create-notice" class="f-textarea editor">{$team['notice']}</textarea></div>
						<span class="hint">Informações detalhadas e validade</span>
					</div>
					<input type="hidden" name="guarantee" value="Y" />
					<input type="hidden" name="system" value="Y" />
					<div class="wholetip clear"><h3>2. Informações sobre esta Oferta
					<div class="field">
						<label>Parceiro</label>
						<select name="partner_id" datatype="require" require="true">${Utility::Option($partners, $team['partner_id'], '------ Escolhar o parceiro ------')}</select>
					</div>
					<div class="field">
						<label>Nome da Oferta</label>
						<input type="text" size="30" name="product" id="team-create-product" class="f-input" value="{$team['product']}" datatype="require" require="true" />
					</div>
					<div class="field">
						<label>Imagem do Produto</label>
						<input type="file" size="30" name="upload_image" id="team-create-image" class="f-input" />
						<span class="hint">Pelo menos uma foto.</span>
					</div>
					<div class="field">
						<label>Foto 1</label>
						<input type="file" size="30" name="upload_image1" id="team-create-image1" class="f-input" />
					</div>
					<div class="field">
						<label>Foto 2</label>
						<input type="file" size="30" name="upload_image2" id="team-create-image2" class="f-input" />
					</div>
					<div class="field">
						<label>FLV Video</label>
						<input type="text" size="30" name="flv" id="team-create-flv" class="f-input" />
						<span class="hint">Formato: http://.../video.flv</span>
					</div>
					<div class="field">
						<label>Detalhes da Oferta</label>
						<div style="float:left;"><textarea cols="45" rows="5" name="detail" id="team-create-detail" class="f-textarea editor"></textarea></div>
					</div>
					<div class="field">
						<label>Comentários</label>
						<div style="float:left;"><textarea cols="45" rows="5" name="userreview" id="team-create-userreview" class="f-textarea">${htmlspecialchars($team['userreview'])}</textarea></div>
						<span class="hint">Format: "That's great! |Rose|http://ww....|XXX Website" One comment each line.</span>
					</div>
					<div class="field">
						<label>{$INI['system']['abbreviation']} abbreviation</label>
						<div style="float:left;"><textarea cols="45" rows="5" name="systemreview" id="team-create-systemreview" class="f-textarea editor"></textarea></div>
					</div>
					<div class="wholetip clear"><h3>3. Informações de Entrega</h3></div>
					<div class="field">
						<label>Delivery</label>
						<div style="margin-top:5px;font-size:12px" id="express-zone-div"><input type="radio" name="delivery" value="coupon" checked>&nbsp;{$INI['system']['couponname']}&nbsp;<input type="radio" name="delivery" value='express' />Entrega expressa<input type="radio" name="delivery" value='pickup' />&nbsp;Self withdraw</div>
					</div>
					<div id="express-zone-coupon" style="display:${$team['delivery']=='coupon'?'block':'none'};">
						<div class="field">
							<label>crédito</label>
							<input type="text" size="10" name="credit" id="team-create-credit" class="number" value="${moneyit($team['credit'])}" />
							<span class="inputtip" require="true" datatype="money">pagar {$INI['system']['couponname']} e ganhe créditos</span>
						</div>
					</div>
					<div id="express-zone-pickup" style="display:${$team['delivery']=='pickup'?'block':'none'};">
						<div class="field">
							<label>Tel.</label>
							<input type="text" size="10" name="mobile" id="team-create-mobile" class="f-input" value="{$login_manager['mobile']}" />
						</div>
						<div class="field">
							<label>Endereço de Retirada</label>
							<input type="text" size="10" name="address" id="team-create-address" class="f-input" value="{$login_manager['address']}" />
						</div>
					</div>
					<div id="express-zone-express" style="display:${$team['delivery']=='express'?'block':'none'};">
						<div class="field">
							<label>Taxa de Entrega</label>
							<input type="text" size="10" name="fare" id="team-create-fare" class="number" value="${intval($team['fare'])}" maxLength="6" datatype="money" require="true" />
							<span class="inputtip">Entrega Grátis</span>
						</div>
						<div class="field">
							<label>Endereço de Entrega</label>
							<div style="float:left;"><textarea cols="45" rows="5" name="express" id="team-create-express" class="f-textarea editor">{$team['express']}</textarea></div>
						</div>
					</div>
					<div class="act">
						<input type="submit" value="Salvar" name="commit" id="leader-submit" class="formbutton"/>
					</div>
				</form>
                </div>
            </div>
            <div class="box-bottom"></div>
        </div>
	</div>

<div id="sidebar">
</div>

</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<!--{include footer}-->
